PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Menu Manager >

Mac OS 8.5 Menu Manager Reference


IsMenuItemEnabled

Reports whether a given menu or menu item is enabled.

pascal Boolean IsMenuItemEnabled (
                     MenuHandle menu,
                     UInt16 item);
menu
A value of type MenuHandle . Pass a handle to the menu containing the item to be examined.
item
An unsigned 16-bit integer. Pass a value specifying the item number of the menu item. Pass 0 to specify the menu title and determine whether the menu as a whole is enabled.
function result
A value of type Boolean . The function returns true if the menu item is currently enabled; otherwise, false .

DISCUSSION

Your application can use the IsMenuItemEnabled function to determine whether specific menu items, even those with item numbers greater than 31, are currently enabled and can therefore be selected by the user.

The IsMenuItemEnabled function works for items enabled or disabled with either the Mac OS 8.5 Menu Manager functions EnableMenuItem and DisableMenuItem or with the pre-Mac OS 8.5 Menu Manager functions EnableItem and DisableItem .


VERSION NOTES

Available with Mac OS 8.5 and later.


© 1999 Apple Computer, Inc. — (Last Updated 19 Jan 99)